package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"strings"
)

func main() {
	path := "F:\\马文浩\\2019\\201911\\"
	files, _ := ioutil.ReadDir(path)
	for _, file := range files {
		filename := file.Name()
		//split := strings.Split(filename, "_")
		if strings.Contains(filename, "mp4") || strings.Contains(filename, "MOV") {
			newName := fmt.Sprintf("VID_%s", filename)
			os.Rename(path + filename, path + newName)
			fmt.Printf("name=%s, newname=%s\n", filename, newName)
		}
	}
}
